//
//  Target_UserCenter.m
//  CharonTVProject
//
//  Created by karong on 2023/8/4.
//

#import "Target_UserCenter.h"
#import "WSPurchaseController.h"
//#import "WSVipController.h"
#import "WSUserInfoController.h"
#import "WSSetUserSexController.h"
#import "WSSetUserAvatarController.h"
#import "WSSettingController.h"
#import "WSAccountController.h"
#import "WSFeedbackController.h"
#import "WSUpdataAlter.h"
#import "WSCoinRecordsController.h"
#import "WSCoinRecordsItemController.h"
#import "WSMyLikeController.h"
#import "WSDelUserAlter.h"

@implementation Target_UserCenter

- (id)Action_charonTV_purchase:(NSDictionary *)params {
    WSPurchaseController * target = (WSPurchaseController *)[self instantiateViewControllerWithName:@"WSPurchaseController"];
    target.selectIndex = [params[@"index"] integerValue];
    return target;
}

//- (id)Action_vip:(NSDictionary *)params {
//    WSVipController * targetVC = (WSVipController *)[self instantiateViewControllerWithName:@"WSVipController"];
//    return targetVC;
//}

- (id)Action_charonTV_userInfo:(NSDictionary *)params {
    WSUserInfoController * targetVC = (WSUserInfoController *)[self instantiateViewControllerWithName:@"WSUserInfoController"];
    targetVC.charonTV_user = params[@"user"];
    return targetVC;
}

- (id)Action_charonTV_userSex:(NSDictionary *)params {
    WSSetUserSexController * targetVC = (WSSetUserSexController *)[self instantiateViewControllerWithName:@"WSSetUserSexController"];
    targetVC.charonTV_selectSexHandle = params[@"selectSexHandle"];
    return targetVC;
}

- (id)Action_charonTV_userAvatar:(NSDictionary *)params {
    WSSetUserAvatarController * targetVC = (WSSetUserAvatarController *)[self instantiateViewControllerWithName:@"WSSetUserAvatarController"];
    targetVC.charonTV_selectSexHandle = params[@"selectSexHandle"];
    return targetVC;
}

- (id)Action_charonTV_setting:(NSDictionary *)params {
    WSSettingController * targetVC = (WSSettingController *)[self instantiateViewControllerWithName:@"WSSettingController"];
    return targetVC;
}

- (id)Action_charonTV_account:(NSDictionary *)params {
    WSAccountController * targetVC = (WSAccountController *)[self instantiateViewControllerWithName:@"WSAccountController"];
    return targetVC;
}

- (id)Action_charonTV_updata:(NSDictionary *)params {
    WSUpdataAlter * targetVC = (WSUpdataAlter *)[self instantiateViewControllerWithName:@"WSUpdataAlter"];
    return targetVC;
}

- (id)Action_charonTV_feedback:(NSDictionary *)params {
    WSFeedbackController * targetVC = (WSFeedbackController *)[self instantiateViewControllerWithName:@"WSFeedbackController"];
    return targetVC;
}

- (id)Action_charonTV_coinRecords:(NSDictionary *)params {
    WSCoinRecordsController * targetVC = (WSCoinRecordsController *)[self instantiateViewControllerWithName:@"WSCoinRecordsController"];
    return targetVC;
}

- (id)Action_charonTV_coinRecordsItem:(NSDictionary *)params {
    WSCoinRecordsItemController * targetVC = (WSCoinRecordsItemController *)[self instantiateViewControllerWithStoryboardNam:@"WSCoinRecordsController" identifier:@"WSCoinRecordsItemController"];
    targetVC.type = [params[@"type"] integerValue];
    return targetVC;
}

- (id)Action_charonTV_like:(NSDictionary *)params {
    WSMyLikeController * targetVC = (WSMyLikeController *)[self instantiateViewControllerWithName:@"WSMyLikeController"];
    return targetVC;
}

- (id)Action_charonTV_delUser:(NSDictionary *)params {
    WSDelUserAlter * targetVC = (WSDelUserAlter *)[self instantiateViewControllerWithStoryboardNam:@"WSSettingController" identifier:@"WSDelUserAlter"];
    if ([params.allKeys containsObject:@"titleStr"])targetVC.titleStr = params[@"titleStr"];
    if ([params.allKeys containsObject:@"content"])targetVC.contentStr = params[@"content"];
    if ([params.allKeys containsObject:@"confirm"])targetVC.confirmStr = params[@"confirm"];
    if ([params.allKeys containsObject:@"cancel"])targetVC.cancelStr = params[@"cancel"];
    targetVC.confirmHandle = params[@"confirmHandle"];
    return targetVC;
}

- (UIViewController *)instantiateViewControllerWithName:(NSString *)name {
   return [self instantiateViewControllerWithStoryboardNam:name identifier:name];
}

- (UIViewController *)instantiateViewControllerWithStoryboardNam:(NSString *)storyboard identifier:(NSString *)identifier{
   return [[UIStoryboard storyboardWithName:storyboard bundle:nil] instantiateViewControllerWithIdentifier:identifier];
}

@end
